package com.css.fxfzysx.modules.lifeline.constants;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * 道路
 */
@AllArgsConstructor
@NoArgsConstructor
public enum RoadEnum {

    GRADE1(1,1,"高速公路"),
    GRADE2(2,1,"一级公路"),
    GRADE3(3,1,"二级公路"),
    GRADE4(4,1,"三级公路"),
    GRADE5(5,1,"四级公路"),

    INTENSITY1(1,2,"Ⅵ"),
    INTENSITY2(2,2,"Ⅶ"),
    INTENSITY3(3,2,"Ⅷ"),
    INTENSITY4(4,2,"Ⅸ"),
    INTENSITY5(5,2,"Ⅹ"),

    ROADBED_SOIL1(1,3,"坚硬土"),
    ROADBED_SOIL2(2,3,"粘土"),
    ROADBED_SOIL3(3,3,"粉土"),
    ROADBED_SOIL4(4,3,"细沙土"),
    ROADBED_SOIL5(5,3,"分期施工路基"),

    SITE_SOIL1(1,4,"I"),
    SITE_SOIL2(2,4,"II"),
    SITE_SOIL3(3,4,"III"),
    SITE_SOIL4(4,4,"IV"),

    FORTIFICATION1(1,5,"已设防"),
    FORTIFICATION2(2,5,"未设防"),
    FORTIFICATION3(3,5,"已有损坏"),

    FOUNDATION_FAIL1(1,6,"无"),
    FOUNDATION_FAIL2(2,6,"轻"),
    FOUNDATION_FAIL3(3,6,"中"),
    FOUNDATION_FAIL4(4,6,"重"),

    ROADBED_TYPE1(1,7,"低矮路基"),
    ROADBED_TYPE2(2,7,"路堤路堑"),
    ROADBED_TYPE3(3,7,"挖填结合"),
    ROADBED_TYPE4(4,7,"沿河路基"),

    PAVEMENT1(1,8,"沥青"),
    PAVEMENT2(1,8,"水泥"),
    PAVEMENT3(1,8,"砂石"),
    PAVEMENT4(1,8,"石质"),
    PAVEMENT5(1,8,"砖铺"),
    PAVEMENT6(1,8,"砼预制块"),
    PAVEMENT7(1,8,"简易铺装路面"),

    PIPE1(1,9,"球墨铸铁管"),
    PIPE2(2,9,"灰口铸铁管"),
    PIPE3(3,9,"钢管"),
    PIPE4(4,9,"石棉水泥管"),
    PIPE5(5,9,"预应力钢筋混凝土管"),
    PIPE6(6,9,"PE管"),
    PIPE7(7,9,"PVC管"),
    PIPE8(8,9,"玻璃钢管"),
    PIPE9(9,9,"PPR管"),
    PIPE10(10,9,"ABS管"),
    PIPE11(11,9,"其他"),

    DEFENSE_SITUATION1(0,10,"未设防"),
    DEFENSE_SITUATION2(1,10,"自设防"),
    DEFENSE_SITUATION3(2,10,"其他"),
    DEFENSE_SITUATION4(6,10,"6度"),
    DEFENSE_SITUATION5(7,10,"7度"),
    DEFENSE_SITUATION6(8,10,"8度"),
    DEFENSE_SITUATION7(9,10,"9度"),


    INTERFACE_MATERIALS1(1,11,"橡胶圈"),
    INTERFACE_MATERIALS2(2,11,"石棉水泥"),
    INTERFACE_MATERIALS3(3,11,"水泥砂浆"),
    INTERFACE_MATERIALS4(4,11,"胶圈石棉灰"),
    INTERFACE_MATERIALS5(5,11,"胶圈自应力灰"),

    LIQUEFACTION_DEGREE1(0,12,"无"),
    LIQUEFACTION_DEGREE2(1,12,"中等"),
    LIQUEFACTION_DEGREE3(2,12,"严重"),

    ACROSS_OBJECT1(1,13,"跨河桥"),
    ACROSS_OBJECT2(2,13,"跨谷桥"),
    ACROSS_OBJECT3(3,13,"跨线桥"),
    ACROSS_OBJECT4(4,13,"高架桥"),
    ACROSS_OBJECT5(5,13,"栈桥等"),

    STRUCTURE1(1,14,"梁式桥"),
    STRUCTURE2(2,14,"拱桥"),
    STRUCTURE3(3,14,"刚构桥"),
    STRUCTURE4(4,14,"悬索桥"),
    STRUCTURE5(5,14,"斜拉桥"),
    STRUCTURE6(6,14,"组合体系桥"),

    QL_GRADE1(1,15,"特大桥"),
    QL_GRADE2(2,15,"大桥"),
    QL_GRADE3(3,15,"中桥"),
    QL_GRADE4(4,15,"小桥"),

    QL_FOUNDATION_FAIL1(1,16,"无"),
    QL_FOUNDATION_FAIL2(2,16,"轻"),
    QL_FOUNDATION_FAIL4(3,16,"重"),

    SUPER_STRUCTURE1(1,17,"连续梁"),
    SUPER_STRUCTURE2(2,17,"刚架"),
    SUPER_STRUCTURE3(3,17,"板梁"),
    SUPER_STRUCTURE4(4,17,"单拱"),
    SUPER_STRUCTURE5(5,17,"连孔拱"),
    SUPER_STRUCTURE6(6,17,"简支梁"),
    SUPER_STRUCTURE7(7,17,"其他"),

    BEARING1(1,18,"有防落梁措施"),
    BEARING2(2,18,"消能(橡胶)支座"),
    BEARING3(3,18,"一般支座"),

    BASEMENT1(1,19,"扩大基础"),
    BASEMENT2(2,19,"桩柱基础"),
    BASEMENT3(3,19,"排架桩"),
    BASEMENT4(4,19,"高桩承台"),

    NUMBER1(1,20,"孔数≤3，跨长≤10米"),
    NUMBER2(2,20,"孔数>3，跨长>10米"),

    MATERIAL1(1,21,"钢筋混凝土"),
    MATERIAL2(1,21,"砖石"),

    ABUTMENT_TYPE1(1,22,"重力式"),
    ABUTMENT_TYPE2(2,22,"埋置式"),
    ABUTMENT_TYPE3(3,22,"框架式"),
    ABUTMENT_TYPE4(4,22,"组合式"),
    ABUTMENT_TYPE5(5,22,"轻型桥台"),

    INTENSITY6(6,23,"Ⅵ"),
    INTENSITY7(7,23,"Ⅶ"),
    INTENSITY8(8,23,"Ⅷ"),
    INTENSITY9(9,23,"Ⅸ"),
    INTENSITY10(10,23,"Ⅹ"),

    STYLE1(1,24,"地下"),
    STYLE2(2,24,"半地下式"),
    STYLE3(3,24,"地上式"),

    SC_MATERIAL1(1,25,"钢筋混凝土"),
    SC_MATERIAL2(2,25,"砖石砌体"),

    SHAPE1(1,26,"圆形"),
    SHAPE2(2,26,"矩形"),

    CLASS1(1,27,"对螺纹和人字纹钢筋"),
    CLASS2(2,27,"对光面钢筋"),
    CLASS3(3,27,"对冷拉低碳钢丝"),

    SURFACE_SHAPE1(1,28,"螺纹"),
    SURFACE_SHAPE2(2,28,"人字纹"),
    SURFACE_SHAPE3(3,28,"光面"),
    SURFACE_SHAPE4(4,28,"冷拔低碳"),

    KINDS1(1,29,"一级"),
    KINDS2(2,29,"二级"),
    KINDS3(3,29,"三级"),

    REGION1(1,30,"省中心及以上"),
    REGION2(2,30,"地区（市）局"),
    REGION3(3,30,"县局");

    private Integer code;
    private Integer type;
    private String name;


    public static String getByCodeAndType(Integer code,Integer type){
        for (RoadEnum value : RoadEnum.values()) {
            if(value.type.equals(type)){
                if(value.code.equals(code)){
                    return value.name;
                }
            }
        }
        return null;
    }
}
